from django.conf.urls import include
from django.urls import path
from django.conf.urls import url
from django.views.static import serve

from django.contrib import admin
from . import settings
from django.conf.urls.static import static


urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('chat.urls')),
    path('', include('bbs.urls')),
    path('', include('friends.urls')),
    path('', include('multichat.urls')),
    path('', include('fileshare.urls'))
]

urlpatterns +=  static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += url(r'^static/(?P<path>.*)$', serve, {"document_root": settings.STATIC_ROOT}),
urlpatterns += url(r'^media/(?P<path>.*)$', serve, {"document_root": settings.MEDIA_ROOT}),